package com.example.droideep.fragment.pager;

import java.util.ArrayList;
import java.util.List;

import droideep.library.base.mvp.BasePresenterFragment;

/**
 * @author bri
 * @date 15-5-19.
 */
public class ViewPagerFragment extends BasePresenterFragment<PagerView> {

    @Override
    protected Class<PagerView> getVuClass() {
        return PagerView.class;
    }

    @Override
    protected void onBindVu() {
        super.onBindVu();
        PagerTest test;
        List<PagerTest> tests = new ArrayList<>();
        for (int i = 0; i < 3; i++) {
            test = new PagerTest(PagerItemFragment.newInstance(i));
            tests.add(test);
        }
        vu.setPagerAdapter(new PagerTestAdapter(getFragmentManager()));
        vu.setItems(tests);
    }
}
